package org.lds.hotkey.worker.controller;

import org.lds.hotkey.common.model.dto.ResultDTO;
import org.lds.hotkey.worker.remote.model.ReceiveRuleModelRequest;
import org.lds.hotkey.worker.service.ReceiveRuleModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/remote/rule-model")
public class ReceiveRuleModelController {

    @Autowired
    private ReceiveRuleModelService receiveRuleModelService;

    @PostMapping("/receive")
    public ResultDTO receiveRuleModel(@RequestBody ReceiveRuleModelRequest request) {
        return receiveRuleModelService.receiveRuleModel(request);
    }
}
